home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1989 / Nov 89 / 0067-Menu bug from rez or-Nov89 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.1 KB  |  76 lines  |  [TEXT/GEOL]

  1. Item forwarded  by  A33          to A34
  2.  
  3. Item    3411204                         9-Nov-89        01:00
  4.  
  5. From:   BEL0076                         Hermes Systems SA
  6.  
  7. To:     MACDTS                          Macintosh Developer Tech. Supt.
  8.  
  9. cc:     MACAPP.TECH$                    MacApp Technical
  10.         BEL0076                         Hermes Systems SA
  11.  
  12. Sub:    Menu bug from rez or Postrez
  13.  
  14. Hello,
  15.  
  16. Using MacApp 2.0ß9 and MPW 3.0.
  17. When -d variable is used in a menu, this causes a bug if the -d variables
  18. includes all the items of the menu till the last menu item.
  19. The resulting bug is that the last item in the menu is always disabled or
  20. activate another menu command.
  21.  
  22.  
  23. Example of bad code ( modified from drawshapes )
  24. In this code,the cLtGray item is always disabled ( Look at the .r file )
  25.  
  26. resource 'cmnu' (5) {
  27.    5,
  28.    textMenuProc,
  29.    allEnabled,
  30.    enabled,
  31.    "Shades",
  32.     {  /* array: 5 elements */
  33. /* [1] */  "White",noIcon, noKey, noMark, plain, cWhite;
  34. /* [2] */  "25% Shading",  noIcon, noKey, noMark, plain, cLtGray
  35. #IF qTestVariable
  36.    ;
  37. /* [3] */  "50% Shading",  noIcon, noKey, noMark, plain, cGray;
  38. /* [4] */  "75% Shading",  noIcon, noKey, noMark, plain, cDkGray;
  39. /* [5] */  "100% Shading", noIcon, noKey, noMark, plain, cBlack
  40. #EndIf
  41.    }
  42. };
  43.  
  44. Example of running code :
  45.  
  46. resource 'cmnu' (5) {
  47.    5,
  48.    textMenuProc,
  49.    allEnabled,
  50.    enabled,
  51.    "Shades",
  52.     {  /* array: 5 elements */
  53. /* [1] */  "White",noIcon, noKey, noMark, plain, cWhite;
  54. /* [2] */  "25% Shading",  noIcon, noKey, noMark, plain, cLtGray;
  55. #IF qTestVariable
  56. /* [3] */  "50% Shading",  noIcon, noKey, noMark, plain, cGray;
  57. #EndIf
  58. /* [4] */  "75% Shading",  noIcon, noKey, noMark, plain, cDkGray;
  59. /* [5] */  "100% Shading", noIcon, noKey, noMark, plain, cBlack
  60.    }
  61. };
  62.  
  63.  
  64. Note : Do not forget to define the qTestVariable in your build file.
  65.  
  66. So it seems that the , or ; is not well processed by rez or Postrez when there
  67. is a test on a -d variable in a 'cmnu' resource file.
  68.  
  69. Please send me your suggestions to solve the problem of managing different
  70. menus under -d variables.
  71.  
  72. Thank you very much.
  73.  
  74. Philippe Lange
  75.  
  76.